﻿using Omabar.BLL;
using Omabar.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Omabar.CMS.Mobile
{
    public partial class TripList : System.Web.UI.Page
    {
        protected string routeId;
        protected ROUTE route;
        protected List<TRIP> trips;
        protected void Page_Load(object sender, EventArgs e)
        {
            Route_BLL routeBLL = new Route_BLL();
            Trip_BLL tripBLL = new Trip_BLL();
            if (!IsPostBack)
            {
                routeId = Request["id"];
                route = routeBLL.GetModel(routeId);
                //行程
                trips = tripBLL.GetModels(string.Format("select Top 10 v.TRIP_ID,TRIP_NAME,TRIP_FOOD,TRIP_DES FROM ROUTE_TRIP T LEFT JOIN TRIP V ON T.TRIP_ID=V.TRIP_ID WHERE T.ROUTE_ID='{0}'", routeId));

                if (trips == null) trips = new List<TRIP>();
            }
        }
    }
}